package v1

import (
	"github.com/gogf/gf/v2/frame/g"
	"hotgo/internal/model/input/form"
	"hotgo/internal/model/input/sysin"
)

type OrderPayReq struct {
	g.Meta `path:"/order/v1/goods/buy" method:"post" tags:"订单中心" summary:"用户支付"`
	sysin.OrderPayInp
}

type OrderPayRes struct {
	AppId     string `json:"appId"`
	TimeStamp string `json:"timeStamp"`
	NonceStr  string `json:"nonceStr"`
	Package   string `json:"package"`
	SignType  string `json:"signType"`
	PaySign   string `json:"paySign"`
}

type OrderQueryReq struct {
	g.Meta `path:"/order/v1/query" method:"get" tags:"订单中心" summary:"客户端查询订单"`
	sysin.UserOrderListInp
}

type OrderQueryRes struct {
	form.PageRes
	List []*sysin.UserOrderListModel `json:"list"   dc:"数据列表"`
}

// 修改订单状态
type OrderStatusReq struct {
	g.Meta `path:"/order/v1/status" method:"post" tags:"订单中心" summary:"修改订单状态"`
	sysin.UserOrderStatusInp
}

type OrderStatusRes struct {
	*sysin.UserOrderViewModel
}

type UnPayOrderRePayReq struct {
	g.Meta `path:"/order/v1/unpay/repay" method:"post" tags:"订单中心" summary:"用户重新支付"`
	sysin.UnPayOrderRePayInp
}

type UnPayOrderRePayRes struct {
	OrderPayRes
}

type RefundRequestReq struct {
	g.Meta `path:"/order/v1/refund/request" method:"post" tags:"订单中心" summary:"用户申请退款"`
	sysin.RefundRequestInp
}

type RefundRequestRes struct {
	*sysin.RefundRequestModel
}

// 核销订单详情
type OrderDetailReq struct {
	g.Meta `path:"/order/v1/detail" method:"get" tags:"订单中心" summary:"核销订单详情"`
	sysin.UserOrderDetailInp
}

type OrderDetailRes struct {
	*sysin.UserOrderDetailModel
}

// 订单确认核销
type OrderVerifyReq struct {
	g.Meta `path:"/order/v1/verify" method:"post" tags:"订单中心" summary:"订单确认核销"`
	sysin.UserOrderVerifyInp
}

type OrderVerifyRes struct {
	*sysin.UserOrderVerifyModel
}

// 查询门店核销数量
type OrderVerifyCountReq struct {
	g.Meta `path:"/order/v1/verify/count" method:"get" tags:"订单中心" summary:"查询门店核销数量"`
	sysin.UserOrderVerifyCountInp
}

type OrderVerifyCountRes struct {
	sysin.UserOrderVerifyCountModel
}

type StoreApiOrderListReq struct {
	g.Meta `path:"/order/v1/store/list" method:"get" tags:"商户API-订单中心" summary:"订单列表"`
	sysin.UserOrderListInp
}

type StoreApiOrderListRes struct {
	form.PageRes
	List []*sysin.UserOrderListModel `json:"list"   dc:"数据列表"`
}
